/*banner*/
       window.onload = function () {
          $(function() {
    var $slider = $('#demo-slider-0');
    var counter = 0;
    var getSlide = function() {
      counter++;
      return '<li><img src="http://s.amazeui.org/media/i/demos/bing-' +
        (Math.floor(Math.random() * 4) + 1) + '.jpg" />' +
        '<div class="am-slider-desc">动态插入的 slide ' + counter + '</div></li>';
    };

    $('.js-demo-slider-btn').on('click', function() {
      var action = this.getAttribute('data-action');
      if (action === 'add') {
        $slider.flexslider('addSlide', getSlide());
      } else {
        var count = $slider.flexslider('count');
        count > 1 && $slider.flexslider('removeSlide', $slider.flexslider('count') - 1);
      }
    });

  });
         /*banner end*/
        /*search*/
   /* var layer0=document.getElementsByClassName("layer0")[0];
	var cream=document.getElementsByClassName("cream")[0];
	cream.onmouseover=function(){
		layer0.style.display="block";
	}
	cream.onmouseout=function(){
		layer0.style.display="none";
	}
		var layer1=document.getElementsByClassName("layer1")[0];
	var cosmetics=document.getElementsByClassName("cosmetics")[0];
	cosmetics.onmouseover=function(){
		layer1.style.display="block";
	}
	cosmetics.onmouseout=function(){
		layer1.style.display="none";
	}*/ 
	
	
	 /*search end*/
	/*star-product*/
	var ularr1=document.getElementById("ularr1");
	var ularr2=document.getElementById("ularr2");
	var span1=document.getElementById("last");
	var span2=document.getElementById("next");
	span2.onclick=function(){
		ularr2.style.display="block";
		ularr1.style.display="none";
	}
	span1.onclick=function(){
		ularr1.style.display="block";
		ularr2.style.display="none";
	}
	
	/*search-all-fixed*/
	var nav=document.getElementById('nav');
     var navFixed=document.getElementById('navFixed');
     window.onscroll=function(){
         var scrollTop=document.documentElement.scrollTop||document.body.scrollTop;
        if(scrollTop>nav.offsetTop){
             navFixed.style.display='block';    
         }else if(scrollTop<nav.offsetTop){
             navFixed.style.display='none';
         }
     }
	}
/*下拉框动画*/
	
